home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / cftextinput.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  953 b   |  39 lines

  1. <!--- This example shows the use of CFTEXTINPUT --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. CFTEXTINPUT Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  12. <BODY  bgcolor="#FFFFD5">
  13.  
  14. <H3>CFTEXTINPUT Example</H3>
  15.  
  16. CFTEXTINPUT can be used to provide simple validation for text
  17. fields in CFFORM and to have control over font information
  18. displayed in CFFORM input boxes for text.  For example, the field provided below must not
  19. be blank, and provides a client-side message upon erring.
  20.  
  21. <P>
  22.  
  23. <CFFORM ACTION="cftextinput.cfm" METHOD="POST" ENABLECAB="Yes">
  24.  
  25. <CFIF IsDefined("form.myInput")>
  26. <H3>You entered <CFOUTPUT>#form.myInput#</CFOUTPUT> into the text box</H3>
  27.  
  28. </CFIF>
  29.  
  30. <CFTEXTINPUT NAME="myInput" FONT="Courier" FONTSIZE=12 VALUE="Look, this text is red!" TEXTCOLOR="FF0000" MESSAGE="This field must not be blank" REQUIRED="Yes">
  31.  
  32.  
  33. <INPUT TYPE="Submit" NAME="" VALUE="submit">
  34. </CFFORM>
  35.  
  36. </BODY>
  37.  
  38. </HTML>       
  39.